GetSystemInfo
Definition:
GetSystemInfo(key)
Description:
Obtain system information specified by the key parameter – see below.
Platforms:
All
Parameters:
key - required
A string specifying the information required. It can contain one of the following values:
"Client.Version"
Return the version of the Digitise Apps Client.
"Client.SerialNumber"
Return the Digitise Apps Device ID – a unique identifier which identifies the device running the Digitise Apps Client to Digitise Apps. For details of the format of this ID see the GetDeviceId Method. This is the same as specifying "Device.PIN".
"Device.PIN"
Return the Digitise Apps Device ID – a unique identifier identifying the device running the Digitise Apps Client to Digitise Apps. For details of the format of this ID see the GetDeviceId Method. This is the same as specifying "Client.SerialNumber".
"Model.Version"
Return the version of the Digitise app's Model.
"Model.Width"
Return the form width specified within the Digitise app's Model.
"Model.Height"
Return the form height specified within the Digitise app's Model.
"Screen.Orientation"
Return the current screen orientation – "Landscape" or "Portrait".
"Screen.Width"
Return the screen width of the device in pixels, or on Android devices in Device Independent Pixels (DIP).
"Screen.Height"
Return the screen height of the device in pixels, or on Android devices in Device Independent Pixels (DIP).
Returns:
The information requested.
Notes:
On Android devices there is a potential issue when upgrading from an earlier version of Digitise Apps' predecessor MX, whereby Control Properties could contain incorrect values after the upgrade. This could mean that Controls will be incorrectly positioned on the screen or interrogating the values of Properties, such as right and left, will report an incorrect value. It could also affect the values returned by GetSystemInfo when specifying "Screen.Height" or "Screen.Width".
In Digitise Apps, control positioning moved to using device independent pixels (DIP) rather than pixels, which might result in Control Properties and screen height and width sizes containing different values than under previous versions of MX, resulting in Controls being incorrectly positioned or reporting their position on the screen wrongly. For backward compatibility, an option is provided to retain the previous behaviour so that the Controls will return to working as before, so you don't have to reposition them or adjust your Scripts to take account of new values in the Screen.Height and Screen.Width Properties.
To retain the original behaviour:
-
Open your Project in App Studio.
-
Click on the top node in the Forms, Data Sources or Resources Panes to display the Application Properties in the Properties Pane.
-
Under the Events category, find the OnLoad Event and double-click on it to open the Application Script window in the Workspace.
-
The Script window will display the current contents of the OnLoad Script. If the Script hasn't previously been edited, the window will look like this:
If this Script has been edited previously, you will see the Script code displayed between the Function OnLoad and End Function lines.
-
To retain the original behaviour, you need to insert the following line immediately after the Function OnLoad line:
' #DISABLE ANDROID_SCREEN_INFO_DPI_FIX
If the Script hasn't otherwise been edited, it will now look like this:
-
You will need to save your Project, republish it and redeploy the app to your users. Your app will now continue to work as it did in the earlier version of MX.